<?php

namespace app\controller;

use app\service\UserService;
use library\wechat;
use think\facade\Db;

class ShopController extends Base
{


   public function  list()
   {

       $res = wechat::get_product_list();
       return json($res);
   }

    public function  get()
    {
        $product_id = $this->request->get('product_id');
        if (empty($product_id)) {
            return json(apiError('商品id不能为空'));
        }
        $res = wechat::get_product($product_id);
        return json($res);
    }



}